/// @file kxtfm.cpp  @version 1.0 @date 05/01/2012
/// @author BlahGeek@Gmail.com

#ifndef H_KXTFM_UI
#define H_KXTFM_UI
#include <QApplication>
#include <QNetworkAccessManager>
#include <QtNetwork>
#include <QNetworkCookieJar>
#include "base64/base64.h"
#include "ui_kxtfm.h"
#include <fstream>
#include <iostream>

class MyWin: public QMainWindow, public Ui::MainWindow{
	Q_OBJECT
	QString refUrl, downloadUrl;
	QNetworkAccessManager * downloader;
	std::ofstream fout;
	QNetworkReply * page;
	QNetworkReply * data;
	bool getUrl();

	public:
		MyWin();
		void print_msg(const QString & msg);
	public slots:
		void downloadPage();
		void downloadError();
		void downloadData();
		void allFinished();
		void setProgress(qint64 value, qint64 total);
};

#endif
